import cv2
import numpy as np

annotation_path = '/home/st/ubuntu_data/dataset/race/cource/label.txt'
with open(annotation_path) as f:
    lines = f.readlines()

for i  in range(len(lines)):
    annotation_line = lines[i]
    line = annotation_line.split()
    image = cv2.imread(line[0])
    for center in line[1:]:
        center_class = np.array(list(map(int,center.split(','))))
        cv2.circle(image,(center_class[0], center_class[1]),2,(0,0,255),2)
    cv2.imshow("check label ok", image)
    cv2.waitKey(0)
